#!/bin/bash
# run by sudo group
# run by root

FILEPATH="out_userpasswd.txt"
if [ -f "${FILEPATH}" ];then
    for line in $(cat ${FILEPATH})
    do
        user=$(echo ${line} | cut -d "," -f 3)
        chsh -s /usr/sbin/nologin ${user}
    done
fi